
PSP_FW_VERSION = 0

ifeq ($(CONFIG_639), 1)
CFLAGS += -DCONFIG_639=1
PSP_FW_VERSION = 639
endif

ifeq ($(CONFIG_660), 1)
CFLAGS += -DCONFIG_660=1
PSP_FW_VERSION = 660
endif

all: 
	$(MAKE) -C payloadex PSP_FW_VERSION=$(PSP_FW_VERSION) PSP_MODEL=0
	$(MAKE) -C payloadex PSP_FW_VERSION=$(PSP_FW_VERSION) PSP_MODEL=1
	$(MAKE) -C mainbinex PSP_FW_VERSION=$(PSP_FW_VERSION) PSP_MODEL=0
	$(MAKE) -C mainbinex PSP_FW_VERSION=$(PSP_FW_VERSION) PSP_MODEL=1
	$(MAKE) -C combine

clean:
	$(MAKE) clean -C payloadex
	$(MAKE) clean -C mainbinex
	$(MAKE) clean -C combine
	@rm -f ipl_block_01g.h ipl_block_large.h
